package com.itheima.reggie.config;

import java.util.ArrayList;
import java.util.List;
//自己定义的类
public class stringtolong {
    public static List<Long> stringToLong(String ids){
        List<Long> idList = new ArrayList<>();
        if (ids.contains(",")){
            String[] id1 = ids.split(",");
            for (String s : id1){
                Long id = Long.valueOf(s);
                idList.add(id);
            }
        }else
        {
            Long value = Long.valueOf(ids);
            idList.add(value);
        }
        return idList;

    }
}
